/**
 * 用户权限验证
 * @param options
 * @param app
 * @returns {sessionRedis}
 */
module.exports = (options, app) => {
    return function* sessionRedis(next) {
        let member = this.session.member;
        if (!member || !member.id){
            return this.redirect('/login');
        }
        app.logger.info(`auth:${this.session.member.id}`);
        yield next;
    }
};
